package main

import (
	"io"
	"os"
	"strings"
)

type rot13Reader struct {
	r io.Reader
}
func(rot *rot13Reader) Read(b []byte) (int,error){
	n,err:=rot.r.Read(b)
	for i:=0;i<n;i++{
		b[i]=rot13(b[i])
	}
	return n,err
    
}
func rot13(b byte) byte {
	switch {
	case (b >= 'A' && b <= 'Z'):
		return (b-'A'+13)%26 + 'A'
	case (b >= 'a' && b <= 'z'):
		return (b-'a'+13)%26 + 'a'
	default:
		return b
	}
}

func main() {
	s := strings.NewReader("Lbh penpxrq gur pbqr!")
	r := rot13Reader{s}
	io.Copy(os.Stdout, &r)
}
